package org.springmvc.mapper;

import org.apache.ibatis.annotations.Param;
import org.springmvc.entity.User;
import org.springmvc.entity.enumeration.Gender;
import org.springmvc.mybatis.Mapper;
import org.springmvc.mybatis.pagination.Pageable;

import java.util.List;

/**
 * @author tangjialin on 2018-08-13.
 */
public interface UserMapper extends Mapper<User> {

    /**
     * 获取用户
     *
     * @param pageable 分页参数
     * @param gender   性别
     * @return 返回用户集合
     */
    List<User> findListByGender(@Param("pageable") Pageable pageable, @Param("gender") Gender gender);

    /**
     * 获取用户
     *
     * @param pageable 分页参数
     * @return 返回用户集合
     */
    List<User> findList(Pageable pageable);
}
